#include<stdio.h>
int main() {
    int days = 30;
    double strangerToRich = days * 100000.0;
    double richToStranger = 0.0;
    double dayMoney = 0.01;
    
    for (int i = 1; i <= days; i++) {
        richToStranger += dayMoney;
        dayMoney *= 2;
    }
    printf("陌生人给百万富翁：%.2f 元\n", strangerToRich);
    printf("百万富翁给陌生人：%.2f 元\n", richToStranger);
    printf("百万富翁净得：%.2f 元\n", strangerToRich - richToStranger);
    
    return 0;
}